package org.inet.minispring;

import org.inet.minispring.bean.beandefinition.ArgumentValues;
import org.inet.minispring.bean.beandefinition.PropertyValues;

public class BeanDefinition {

    public static final String SCOPE_SINGLETON = "singleton";

    public static final String SCOPE_PROTOTYPE = "prototype";

    private String id;

    private String className;

    private String scope = SCOPE_SINGLETON;  // 指示 bean 是单例还是多例

    private boolean lazyInit = false;  // 是否懒加载

    private String[] dependsOn;

    private ArgumentValues constructorArguments;

    private PropertyValues propertyValues;

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public boolean isLazyInit() {
        return lazyInit;
    }

    public void setLazyInit(boolean lazyInit) {
        this.lazyInit = lazyInit;
    }

    public String[] getDependsOn() {
        return dependsOn;
    }

    public void setDependsOn(String[] dependsOn) {
        this.dependsOn = dependsOn;
    }

    public ArgumentValues getConstructorArguments() {
        return constructorArguments;
    }

    public void setConstructorArguments(ArgumentValues constructorArguments) {
        this.constructorArguments = constructorArguments;
    }

    public PropertyValues getPropertyValues() {
        return propertyValues;
    }

    public void setPropertyValues(PropertyValues propertyValues) {
        this.propertyValues = propertyValues;
    }

    public String getInitMethodName() {
        return initMethodName;
    }

    public void setInitMethodName(String initMethodName) {
        this.initMethodName = initMethodName;
    }

    private String initMethodName;

    public BeanDefinition(String id, String className) {
        this.id = id;
        this.className = className;
    }

    public String getId() {
        return id;
    }

    public String getClassName() {
        return className;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setClassName(String className) {
        this.className = className;
    }
}
